示例#1
0
        public static ThrownItem Spawn(PrototypeWeaponItem item, Vector2 position, Vector2 vel, bool stickInTarget = false, int pierce = 0, float gravity = 5, bool isEnemy = false, float rotationOffset = 0, float glow = 0)
        {
            ProjectileScript p = ProjectileScript.Spawn(position, item.sprite, vel, stickInTarget, pierce, gravity, -1, false, rotationOffset, glow);
            ThrownItem       i = p.gameObject.AddComponent <ThrownItem>();

            i.item = item;
            Debug.LogError("Test");
            return(i);
        }
示例#2
0
 public GameObject SpawnProjectile(Vector2 pos, Vector2 dir)
 {
     return(ProjectileScript.Spawn(pos, projectileSprite, speed * dir, rotationOffset: -90, glow: 3f).gameObject);
 }