summaryrefslogtreecommitdiff
path: root/SurvivalTest/Assets/Scripts/Items/Item_B2Phone.cs
blob: a7aff51caa8001f3babad7f01596b0845e4ec386 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// B2ºô½Ð»ú
/// </summary>
public class Item_B2Phone : ItemBase
{
	public override string name => "B2";

	public override string iconPath => "art/ui/itemicon/plane";

	string prefabPath = "prefabs/weapon/b2";

	public override void OnUse(GameObject owner)
	{
		TestB2 b2 = UnityEngine.Object.Instantiate(ResourceManager.Instance.Load<TestB2>(prefabPath));

		Vector3 pos3D = owner.GetComponent<TopDownTransform>().GetProjectedPosition();
		b2.Set(pos3D + new Vector3(-15, 0, 0), pos3D + new Vector3(15, 0, 0), 20f, 3f);
	}

}