コード例 #1
0
ファイル: SGun.cs プロジェクト: aveturi/ContraMechanicsClone
	public SGun (ContraEntity entity) {
		this.entity = entity;
		bulletPrefab = Resources.Load ("Bullet") as GameObject;
		bulletCount = 0;
		timeBetweenSteps = 0.5f;
		numMaxBullets = 1;
	}
コード例 #2
0
ファイル: FGun.cs プロジェクト: aveturi/ContraMechanicsClone
	public FGun (ContraEntity entity) : base(entity) {
		this.entity = entity;
		bulletPrefab = Resources.Load ("FireballBullet") as GameObject;
		bulletCount = 0;
		timeBetweenSteps = 0.9f;
		numMaxBullets = 4;
	}
コード例 #3
0
ファイル: FGun.cs プロジェクト: aveturi/ContraMechanicsClone
 public FGun(ContraEntity entity) : base(entity)
 {
     this.entity      = entity;
     bulletPrefab     = Resources.Load("FireballBullet") as GameObject;
     bulletCount      = 0;
     timeBetweenSteps = 0.9f;
     numMaxBullets    = 4;
 }
コード例 #4
0
ファイル: MGun.cs プロジェクト: aveturi/ContraMechanicsClone
 public MGun(ContraEntity entity)
 {
     this.entity      = entity;
     bulletPrefab     = Resources.Load("Bullet") as GameObject;
     bulletCount      = 0;
     timeBetweenSteps = 0.3f;
     numMaxBullets    = 1;
 }
コード例 #5
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other != null && other.tag != null && !safeTags.Contains(other.tag) && other.tag != this.ownerTag)
     {
         ContraEntity entity = other.gameObject.GetComponent <ContraEntity>();
         entity.Damage(damageVal);
     }
 }
コード例 #6
0
	// Use this for initialization
	void Start () {
		RenderersOff ();
		this.entity = this.transform.parent.gameObject.GetComponent<ContraEntity> ();
			
			L = new Vector2(-1,0).normalized;
			R = new Vector2(1,0).normalized;
			TL = new Vector2(-1,1).normalized;
			TR = new Vector2(1,1).normalized;
			BL = new Vector2(-1,-1).normalized;
			BR = new Vector2(1,-1).normalized;
			U = new Vector2(0,1).normalized;
			D = new Vector2(0,-1).normalized;
	}
コード例 #7
0
    // Use this for initialization
    void Start()
    {
        RenderersOff();
        this.entity = this.transform.parent.gameObject.GetComponent <ContraEntity> ();

        L  = new Vector2(-1, 0).normalized;
        R  = new Vector2(1, 0).normalized;
        TL = new Vector2(-1, 1).normalized;
        TR = new Vector2(1, 1).normalized;
        BL = new Vector2(-1, -1).normalized;
        BR = new Vector2(1, -1).normalized;
        U  = new Vector2(0, 1).normalized;
        D  = new Vector2(0, -1).normalized;
    }
コード例 #8
0
 protected void OnTriggerExit2D(Collider2D other)
 {
     if (other.tag == "Bullet")
     {
         Bullet bullet = other.gameObject.GetComponent <Bullet>();
         Destroy(bullet.gameObject);
     }
     else
     {
         ContraEntity entity = other.gameObject.GetComponent <ContraEntity>();
         if (entity != null)
         {
             entity.Damage(dam);
         }
     }
 }
コード例 #9
0
	public SniperController (ContraEntity entity) : base(entity) 
	{
		bill = GameObject.FindGameObjectWithTag ("BillRizer");
		angleBoundary = 15f;
	}
コード例 #10
0
 public WallTurretController(ContraEntity entity) : base(entity)
 {
     angleBoundary = 30f;
 }
コード例 #11
0
 public Controller(ContraEntity entity)
 {
     this.entity = entity;
 }
コード例 #12
0
	public CannonController (ContraEntity entity) : base(entity) 
	{
		angleBoundary = 45f;
	}
コード例 #13
0
	public CamoSniperController (ContraEntity entity) : base(entity) 
	{
		bill = GameObject.FindGameObjectWithTag ("BillRizer");
	}
コード例 #14
0
 public CamoSniperController(ContraEntity entity) : base(entity)
 {
     bill = GameObject.FindGameObjectWithTag("BillRizer");
 }
コード例 #15
0
	void Awake () {
		parentEntity = this.transform.parent.gameObject.GetComponent<ContraEntity> ();
	}
コード例 #16
0
 public CannonController(ContraEntity entity) : base(entity)
 {
     angleBoundary = 45f;
 }
コード例 #17
0
	public Controller (ContraEntity entity) {
		this.entity = entity;
	}
コード例 #18
0
	public WallTurretController (ContraEntity entity) : base(entity) 
	{
		angleBoundary = 30f;
	}
コード例 #19
0
	public BillController (ContraEntity entity) : base(entity) 
	{
		bill = entity as Bill;
	}
コード例 #20
0
 public BillController(ContraEntity entity) : base(entity)
 {
     bill = entity as Bill;
 }
コード例 #21
0
 void Awake()
 {
     parentEntity = this.transform.parent.gameObject.GetComponent <ContraEntity> ();
 }
コード例 #22
0
 public SniperController(ContraEntity entity) : base(entity)
 {
     bill          = GameObject.FindGameObjectWithTag("BillRizer");
     angleBoundary = 15f;
 }